import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { setupComponents } from '@/components'
import { setupElement, setupProviders, setupDirectives } from '@/plugins'

import App from './App.vue'
import router from './router'

const app = createApp(App)

// 注册全局常用的Element-plus组件
setupElement(app)

// 注册自定义组件
setupComponents(app)

// 安装全局方法
setupProviders(app)

// 注册全局自定义指令
setupDirectives(app)

app.use(createPinia())
app.use(router)

app.mount('#app')
